package com.wmh.baseservice.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2022-07-10
 */
@ApiModel(value="SysChat对象", description="系统聊天消息表")
public class SysChat implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "用户id/商家id 系统-1")
    private Long uid;

    @ApiModelProperty(value = "user/merchant/system")
    private String type;

    @ApiModelProperty(value = "消息类型	text:普通文本	voice:音频	img:图片	redEnvelope:红包")
    private String msgType;

    @ApiModelProperty(value = "消息内容")
    private String content;

    @ApiModelProperty(value = "音频消息时长")
    private String length;

    @ApiModelProperty(value = "图片宽度")
    private Integer w;

    @ApiModelProperty(value = "图片高度")
    private Integer h;

    @ApiModelProperty(value = "红包id")
    private Long rid;

    @ApiModelProperty(value = "是否已接收红包")
    private Integer hasReceived;

    @ApiModelProperty(value = "接收人id")
    private Long sendId;

    @ApiModelProperty(value = "接收人类型 0用户 1商家(添加此字段是因为还有系统消息)")
    private Integer sendType;

    @ApiModelProperty(value = "会话idkey")
    private String sessionId;

    public Long getId() {
        return id;
    }

    public SysChat setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public SysChat setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public SysChat setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public SysChat setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public SysChat setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public SysChat setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public Long getUid() {
        return uid;
    }

    public SysChat setUid(Long uid) {
        this.uid = uid;
        return this;
    }
    public String getType() {
        return type;
    }

    public SysChat setType(String type) {
        this.type = type;
        return this;
    }
    public String getMsgType() {
        return msgType;
    }

    public SysChat setMsgType(String msgType) {
        this.msgType = msgType;
        return this;
    }
    public String getContent() {
        return content;
    }

    public SysChat setContent(String content) {
        this.content = content;
        return this;
    }
    public String getLength() {
        return length;
    }

    public SysChat setLength(String length) {
        this.length = length;
        return this;
    }
    public Integer getW() {
        return w;
    }

    public SysChat setW(Integer w) {
        this.w = w;
        return this;
    }
    public Integer getH() {
        return h;
    }

    public SysChat setH(Integer h) {
        this.h = h;
        return this;
    }
    public Long getRid() {
        return rid;
    }

    public SysChat setRid(Long rid) {
        this.rid = rid;
        return this;
    }
    public Integer getHasReceived() {
        return hasReceived;
    }

    public SysChat setHasReceived(Integer hasReceived) {
        this.hasReceived = hasReceived;
        return this;
    }
    public Long getSendId() {
        return sendId;
    }

    public SysChat setSendId(Long sendId) {
        this.sendId = sendId;
        return this;
    }
    public Integer getSendType() {
        return sendType;
    }

    public SysChat setSendType(Integer sendType) {
        this.sendType = sendType;
        return this;
    }
    public String getSessionId() {
        return sessionId;
    }

    public SysChat setSessionId(String sessionId) {
        this.sessionId = sessionId;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String UID = "uid";

    public static final String TYPE = "type";

    public static final String MSG_TYPE = "msg_type";

    public static final String CONTENT = "content";

    public static final String LENGTH = "length";

    public static final String W = "w";

    public static final String H = "h";

    public static final String RID = "rid";

    public static final String HAS_RECEIVED = "has_received";

    public static final String SEND_ID = "send_id";

    public static final String SEND_TYPE = "send_type";

    public static final String SESSION_ID = "session_id";

    @Override
    public String toString() {
        return "SysChat{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", uid=" + uid +
            ", type=" + type +
            ", msgType=" + msgType +
            ", content=" + content +
            ", length=" + length +
            ", w=" + w +
            ", h=" + h +
            ", rid=" + rid +
            ", hasReceived=" + hasReceived +
            ", sendId=" + sendId +
            ", sendType=" + sendType +
            ", sessionId=" + sessionId +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            SysChat.ID
            ,SysChat.STATUS
            ,SysChat.REMARK
            ,SysChat.VERSION
            ,SysChat.CREATE_TIME
            ,SysChat.UPDATE_TIME
            ,SysChat.UID
            ,SysChat.TYPE
            ,SysChat.MSG_TYPE
            ,SysChat.CONTENT
            ,SysChat.LENGTH
            ,SysChat.W
            ,SysChat.H
            ,SysChat.RID
            ,SysChat.HAS_RECEIVED
            ,SysChat.SEND_ID
            ,SysChat.SEND_TYPE
            ,SysChat.SESSION_ID
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}